'use strict';

angular.module('app')
	.controller('homePageController', [ '$rootScope', '$scope', '$http', '$state',
	                                function($rootScope, $scope, $http, $state) {
		$scope.v=new Date().getTime();
		
		setTimeout(function(){
			$.ajax({
	            url: $scope.app.project_name + '/user/read/current',
	            success: function (result) {
	                if (result.httpCode == 200) {
	                    if (result.user.userType == 4) {
	                    	$scope.$apply(function(){
	                    	  $scope.finishCount = result.finishCount;
	                    	  $scope.unFinishCount = result.unFinishCount;
	                    	  $scope.beanlist = result.beanlist;
	                    	  $scope.allBeanlist = result.allBeanlist;
	                    	  // $scope.platformCountBeanList = result.platformCountBeanList;
	                    	  // $scope.CourierStationCountBeanList = result.CourierStationCountBeanList;
	                    	  // $scope.firePostCountBeanList = result.firePostCountBeanList;
	                    	})
	                    }
	                }
	            }
	        });
		},1500)
} ]);